/**
 * Created by cuppi on 2016/11/25.
 */
class NumberTool {
  static prefixInteger(number, length){
    return (Array(length).join(0) + number).slice(-length);
  }
  static fixNumberTo(number, fixed){
    return Number(number).toFixed(fixed);
  }

  static zeroToText(number, text) {
    if (number <= 0) {
      return text;
    } else {
      return number;
    }
  }
}

export default NumberTool;
